trait TransmogrifiableCore {
	trait Transmogrifiable[s <: Transmogrifiable[s]] requires s{
		def transmogrify :s
	}
}

trait FooCore {
	[open] trait Foo 
		case object Bar extends Foo 
		case object Baz extends Foo 
}

trait XMogFoo requires XMogFoo with TransmogrifiableCore with FooCore {	
	trait Foo extends Transmogrifiable[Foo]
		case object Bar extends Foo  {
			def transmogrify = Baz
		}
		case object Baz extends Foo   {
			def transmogrify = Bar
		}
}

object main extends TransmogrifiableCore with FooCore with XMogFoo {
	def main(args :Array[String])  = System.out.println(Bar.transmogrify)
}